import Koa from 'koa';
import bodyParser from 'koa-bodyparser';
import Static from 'koa-static';
import router from "./uiltis/Router.js";
import {Port} from './config/setting.js';
import { registryTemplate, processStaticResources } from './uiltis/render.js'

let apply = new Koa();

apply.use(router)

apply.use(bodyParser());

apply.use(registryTemplate());

apply.use(Static('../static'))

apply.listen(Port,()=>{
	console.log(`service is run at http://127.0.0.1:${Port}`)
})